type IFormType = 'input' | 'password' | 'select' | 'datePicker';

interface IFormOptionType {
  label: string;
  value: any;
}

export interface IFormItem {
  label: string;
  key: string;
  rules?: any[];
  placeholder?: string;
  type: IFormType;
  isHide?: boolean;
  filed?: { label: string; value: string };

  // 针对select
  options?: IFormOptionType[];
  // 直接绑定到组件上
  otherOptions?: any;
}

export interface IForm {
  formItems: IFormItem[];
  labelWidth?: string;
  itemStyle?: any;
  colLayout?:
    | number
    | {
        span?: number;
        offset?: number;
      };
}
